Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface System.​Buffers.​IBufferWriter<​T>
Assembly: System.Memory
Represents an output sink into which <typeparamref name="T" /> data can be written.
Methods
void
Advance​(int count)
Notifies the <see cref="T:System.Buffers.IBufferWriter`1" /> that <paramref name="count" /> data items were written to the output <see cref="T:System.Span`1" /> or <see cref="T:System.Memory`1" /> .
count
The number of data items written to the <see cref="T:System.Span`1" /> or <see cref="T:System.Memory`1" /> .
Memory<​T>
GetMemory​(int sizeHint = 0)
Returns a <see cref="T:System.Memory`1" /> to write to that is at least the requested size (specified by <paramref name="sizeHint" /> ).
Returns A <see cref="T:System.Memory`1" /> of at least the size <paramref name="sizeHint" /> . If <paramref name="sizeHint" /> is 0, returns a non-empty buffer.
sizeHint
The minimum length of the returned <see cref="T:System.Memory`1" /> . If 0, a non-empty buffer is returned.
Span<​T>
GetSpan​(int sizeHint = 0)
Returns a <see cref="T:System.Span`1" /> to write to that is at least the requested size (specified by <paramref name="sizeHint" /> ).
Returns A <see cref="T:System.Span`1" /> of at least the size <paramref name="sizeHint" /> . If <paramref name="sizeHint" /> is 0, returns a non-empty buffer.
sizeHint
The minimum length of the returned <see cref="T:System.Span`1" /> . If 0, a non-empty buffer is returned.